<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
<title>新增总结</title>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<!--[if lt IE 9]>
<script type="text/javascript" src="__PUBLIC__/Admin/lib/html5.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/lib/respond.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/lib/PIE_IE678.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/lib/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/lib/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/lib/Hui-iconfont/1.0.7/iconfont.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/css/sty.css">
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<!--/meta 作为公共模版分离出去-->

<style type="text/css">
	.f-w{font-weight: bold;}
    td{font-size: 14px !important}
    .page-container{margin-bottom: 25px}
    button{margin-left: 20px }
    textarea,.Wdate{background-color: #fbfbfb !important}
    .textarea{height: 70px;width: 90%}
    .wq5{margin-top: 10px;margin-bottom: 10px;}
    .date1{padding-left: 27px !important}
    .textarea1{margin-top: 10px;}
    .a_c{float: right;padding-right: 100px;padding-top: 20px;color: blue}
    .btn1{width: 80px;margin: 15px;}/*new*/
</style>
</head>
<body>
<div class="page-container">
    <div class="mt-20 wq5" style="padding-bottom: 12px !important;padding-top: 12px !important">
    <form action="" method="post" class="form form-horizontal" id="form-article-add">
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>负责人姓名：</label>
            <div class="formControls col-xs-6 col-sm-7 date1">
                <input type="text" class="input-text" name="realname" id="realname" placeholder="请输入负责人姓名">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label  col-xs-4 col-sm-3" >生日：</label>
            <div class="formControls col-xs-6 col-sm-7 date1">
                <input type="text"  onfocus="WdatePicker()" name="birthday" id="birthday" class="input-text Wdate" style="width:180px;">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label  col-xs-4 col-sm-3" >性别：</label>
            <div class="formControls col-xs-8 col-sm-9 skin-minimal">
                <div class="radio-box">
                    <input name="sex" value="1" type="radio" id="sex-1" checked>
                    <label for="sex-1">男</label>
                </div>
                <div class="radio-box">
                    <input type="radio" value="2" id="sex-2" name="sex">
                    <label for="sex-2">女</label>
                </div>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label  col-xs-4 col-sm-3" >联系电话：</label>
            <div class="formControls col-xs-6 col-sm-7 date1">
                <input type="text"  class="input-text" value="" placeholder="请输入电话号码" id="tel" name="tel">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label  col-xs-4 col-sm-3" >QQ:</label>
            <div class="formControls col-xs-6 col-sm-7 date1">
                <input type="text"  class="input-text" value="" placeholder="QQ号" id="qq" name="qq">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label  col-xs-4 col-sm-3" >微信：</label>
            <div class="formControls col-xs-6 col-sm-7 date1">
                <input type="text"  class="input-text" value="" placeholder="请输入微信号" id="wechat" name="wechat">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label  col-xs-4 col-sm-3" >Email：</label>
            <div class="formControls col-xs-6 col-sm-7 date1">
                <input type="text"  class="input-text" value="" placeholder="请输入邮箱地址" id="email" name="email">
            </div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-3 col-sm-offset-2 text-c">
                <!-- 修改 -->
                <input onclick="tj()" id="sub" class="btn btn-primary radius btn1" type="button" value="添加"></input>
                <a href="{:U('Client/add',array('cid'=>$cid))}">
                    <span class="btn btn-default radius btn1">返回</span>
                </a>
            </div>
        </div>
    </form>
    </div>
</div>

<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="__PUBLIC__/Admin/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="__PUBLIC__/Admin/lib/layer/2.1/layer.js"></script> 
<script type="text/javascript" src="__PUBLIC__/Admin/lib/static/h-ui/js/H-ui.js"></script> 
<script type="text/javascript" src="__PUBLIC__/Admin/lib/static/h-ui.admin/js/H-ui.admin.js"></script> 
<script type="text/javascript" src="__PUBLIC__/Admin/lib/My97DatePicker/WdatePicker.js"></script>
<!--/_footer /作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">
// 添加 
function tj(){
    if( $.trim($('#realname').val()) == '' ){ 
        layer.msg('请先填写负责人名称',{icon:2,time:1000});
    }else{
        $('#sub').attr('display','');
        $.ajax({  
            url: "{:U('Client/contactAddCheck',array('cid'=>$cid))}", 
            type: "POST",  
            data: $('form').serializeArray(), 
            success: function(msg){  
                //console.log(msg);
                if(msg['state'] == 200){
                    layer.msg(msg['content'],{icon:1,time:1000});
                    setTimeout('window.location.href = "{:U('Client/add',array('cid'=>$cid))}"', 1000);
                }else{
                    layer.msg(msg['content'],{icon:2,time:1000});
                    $('#sub').attr('display','tj()');
                }
            }  
        });
    }
}
</script>

</body>
</html>